//
//  BaseView.swift
//
//  Created by Ink on 2024/7/1.
//  Copyright © 2024 ZM. All rights reserved.
//

open class BaseView: UIView {
    
    public override init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }
    
    public convenience init() {
        self.init(frame: CGRect.zero)
    }
    
    public override func awakeFromNib() {
        super.awakeFromNib()
        setup()
    }
    
    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    open func setup() {}
    
    deinit {
        rxDisposeBag = DisposeBag()
        NotificationCenter.default.removeObserver(self)
    }
}
